// const baseUrl="http://127.0.0.1:1730"
// const baseUrl="http://43.143.211.211:1730"


// https://61211w73f7.zicp.fun
const baseUrl="http://127.0.0.1:1732"
const imgUrl = "http://127.0.0.1:1732/image/"

// const baseUrl="https://61211w73f7.zicp.fun"
// const imgUrl = "https://61211w73f7.zicp.fun/image/"
// const appName = "宏鼎烘焙"

export const getImgUrl = ()=>{
  return imgUrl
}

export const getbaseUrl=()=>{
    return baseUrl
}

// export const shopName = ()=>{
//      return appName
// }

export const requestUtil =(obj)=>{
   return new Promise((resolve,reject)=>{
        wx.request({
           ...obj,
           url:baseUrl+obj.url,
           header:{
            'content-type': 'application/x-www-form-urlencoded'
          },
           success:(res)=>{
                resolve(res)
           },
           fail:(err)=>{
                reject(err)
           },
           complete:()=>{
                wx.hideLoading()
           }
        })
       
   })
    // console.log({...obj,url:baseUrl+obj.url})
}